﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;


namespace Fred
{
    class GameEvents : Game1
    {
        public GameEvents()
            : base()
        {
        }

        /// <summary>
        /// Metod to return if a key has been pressed on the keyboard. (Press & Release)
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        public static Boolean havePressed(Keys key)
        {
            return(keyboard.IsKeyDown(key) && !old_keyboard.IsKeyDown(key));
        }


        /// <summary>
        /// Metod to return if a key is being pressed on the keyboard.
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        public static Boolean isPressed(Keys key)
        {
            return (keyboard.IsKeyDown(key));
        }


        /// <summary>
        /// Gravity. It'll affect every object and creatures on game.
        /// </summary>
        public void gravity()
        {
            // Going to do later.
        }


    }
}
